namespace Cik.Gapi4Net.Domain.Output.NewsSearch
{
    using System;
    using Contract;
    using Core.Json;
    using Newtonsoft.Json;

    [JsonObject]
    public class MainResult : IMainResult
    {
        [JsonProperty("GsearchResultClass")]
        public string GsearchResultClass { get; set; }

        [JsonProperty("clusterUrl")]
        public string ClusterUrl { get; set; }

        [JsonProperty("content")]
        public string Content { get; set; }

        [JsonProperty("image")]
        [JsonConverter(typeof(CustomObjectCreationConverter<IImage, Image>))]
        public IImage Image { get; set; }

        [JsonProperty("language")]
        public string Language { get; set; }

        [JsonProperty("location")]
        public string Location { get; set; }

        [JsonProperty("publishedDate")]
        [JsonConverter(typeof(Rfc822DateTimeConverter))]
        public DateTime PublishedDate { get; set; }

        [JsonProperty("publisher")]
        public string Publisher { get; set; }

        [JsonProperty("relatedStories")]
        [JsonConverter(typeof(CustomArrayCreationConverter<IRelatedStories, RelatedStories>))]
        public IRelatedStories[] RelatedStories { get; set; }

        [JsonProperty("signedRedirectUrl")]
        public string SignedRedirectUrl { get; set; }

        [JsonProperty("title")]
        public string Title { get; set; }

        [JsonProperty("titleNoFormatting")]
        public string TitleNoFormatting { get; set; }

        [JsonProperty("unescapedUrl")]
        public string UnescapedUrl { get; set; }

        [JsonProperty("url")]
        public string Url { get; set; }
    }
}